adding attributes to a new template

I have created some new templates for our in house processes.

Next item I need to do is to include various attribute columns that can be included automatically into the new template.

Ideally this should be done with the template, or alternatively from our DXL menu item.

I am fairly new to DXL/Doors and have not been able locate a similar example.

Any help will be appreciated.

Thanks
soymilk - Mon Nov 02 04:44:25 EST 2009

Re: adding attributes to a new template
mwilliamson - Mon Nov 02 05:09:49 EST 2009

Hi,

I'm assuming that you have created the attributes with the template module. It is just a case of using the DOORS UI to add a column to the current view and select the appropriate attribute. The view can then be saved with a new name using View/Save As..

As long as the permissions are set appropriately on the View then the columns will be visible to the user.

Hope this helps.

Mark

Re: adding attributes to a new template
soymilk - Mon Nov 02 05:35:30 EST 2009

mwilliamson - Mon Nov 02 05:09:49 EST 2009
Hi,

I'm assuming that you have created the attributes with the template module. It is just a case of using the DOORS UI to add a column to the current view and select the appropriate attribute. The view can then be saved with a new name using View/Save As..

As long as the permissions are set appropriately on the View then the columns will be visible to the user.

Hope this helps.

Mark

thank you Mark.

You are one step ahead of me.

My question rephrased is "how do I create a template with attributes?"

Re: adding attributes to a new template
mwilliamson - Mon Nov 02 05:47:01 EST 2009

soymilk - Mon Nov 02 05:35:30 EST 2009
thank you Mark.

You are one step ahead of me.

My question rephrased is "how do I create a template with attributes?"

Open for edit the template module and then select Edit/Attributes from Module menu. Create the attributes you need for the template using the existing data types or specify new data types using the Edit/Types... menu item.

In the create attribute dialog there is a tick box to include in current view.

Mark

Re: adding attributes to a new template
soymilk - Mon Nov 02 06:06:26 EST 2009

mwilliamson - Mon Nov 02 05:47:01 EST 2009
Open for edit the template module and then select Edit/Attributes from Module menu. Create the attributes you need for the template using the existing data types or specify new data types using the Edit/Types... menu item.

In the create attribute dialog there is a tick box to include in current view.

Mark

Mark

I understand the process for creating attributes and making them viewable.

My intestion here is to ensure some consistency in how the template is used, so that every time a template is created in a new module (or added to an existing module) that the same set of attributes are created alongside it.

For example I have created a Functional Design Specification template for a our SRU's and for each FDS we have the '_V&V method' attribute added with a list of options (analysis, analogy, test and so on).

In order to ensure the consistancy of the FDS, I need the template to inlcude this attributes with the options.

Of course a work around is to copy the attributes from an existing formal module. The preffered method is to have the attributes come with the template (or run a dxl script) to add them after the module and template is instantiated.

Regards
Sasha

Re: adding attributes to a new template
mwilliamson - Mon Nov 02 06:10:02 EST 2009

soymilk - Mon Nov 02 06:06:26 EST 2009
Mark

I understand the process for creating attributes and making them viewable.

My intestion here is to ensure some consistency in how the template is used, so that every time a template is created in a new module (or added to an existing module) that the same set of attributes are created alongside it.

For example I have created a Functional Design Specification template for a our SRU's and for each FDS we have the '_V&V method' attribute added with a list of options (analysis, analogy, test and so on).

In order to ensure the consistancy of the FDS, I need the template to inlcude this attributes with the options.

Of course a work around is to copy the attributes from an existing formal module. The preffered method is to have the attributes come with the template (or run a dxl script) to add them after the module and template is instantiated.

Regards
Sasha

Hi Sasha,

I think I understand your problem now. I have implemented a similar scheme to enforce template attributes and module structure by creating a dxl script which accepts user input for new module title etc via a Dialog Box and then copies the module template (including any defined attributes) into the new module.
 

copy(module "Your template module",new module name,new module description)

 


Mark

 

Re: adding attributes to a new template
soymilk - Mon Nov 02 07:39:53 EST 2009

mwilliamson - Mon Nov 02 06:10:02 EST 2009

Hi Sasha,

I think I understand your problem now. I have implemented a similar scheme to enforce template attributes and module structure by creating a dxl script which accepts user input for new module title etc via a Dialog Box and then copies the module template (including any defined attributes) into the new module.
 

copy(module "Your template module",new module name,new module description)

 


Mark

 

Mark

that is the part the I am attempting to do, define attributes for a module template.

Here is my (cut down) code for the template which is in the template directory

// SRU Functional Design Specfication
 
// 
// Written By Sasha 30 October 2009
// 
 
/*
   template
*/
 
Template srufds = template "INTRODUCTION" <<
 
 "PURPOSE OF DOCUEMENT" 
 "SCOPE OF DOCUMENT" 
 "DEFINITIONS, ACRONYMS, AND ABBREVIATIONS" 
 "REFERENCES" 
 "OVERVIEW" 
 
instance srufds

 


How can I assoicate attributes and values with this template, so when it is created, attributes are also created.

Thanks
Sasha

 

Re: adding attributes to a new template
mwilliamson - Mon Nov 02 07:46:01 EST 2009

soymilk - Mon Nov 02 07:39:53 EST 2009

Mark

that is the part the I am attempting to do, define attributes for a module template.

Here is my (cut down) code for the template which is in the template directory

// SRU Functional Design Specfication
 
// 
// Written By Sasha 30 October 2009
// 
 
/*
   template
*/
 
Template srufds = template "INTRODUCTION" <<
 
 "PURPOSE OF DOCUEMENT" 
 "SCOPE OF DOCUMENT" 
 "DEFINITIONS, ACRONYMS, AND ABBREVIATIONS" 
 "REFERENCES" 
 "OVERVIEW" 
 
instance srufds

 


How can I assoicate attributes and values with this template, so when it is created, attributes are also created.

Thanks
Sasha

 

Hi Sasha,

My apologies, I interpreted your question as being about using an existing module as a template, not using DOORS templates as specified in lib/dxl/standard/template. I haven't ever made use of templates in this manner.

Mark

Re: adding attributes to a new template
soymilk - Mon Nov 02 08:06:54 EST 2009

mwilliamson - Mon Nov 02 07:46:01 EST 2009
Hi Sasha,

My apologies, I interpreted your question as being about using an existing module as a template, not using DOORS templates as specified in lib/dxl/standard/template. I haven't ever made use of templates in this manner.

Mark

Hi Mark

thanks for your response.

I am open to different ways to achevie the same result.

So if using an existing project with formal modules in doors is a better way to achevie the same result, then by all means that may be the way forward.

From your code example

copy(module "Your template module",new module name,new module description)

 


I understand this is the way you achieve the result.

So does that mean you have a template project created in doors, that has all of the your formal modules, with headings, tables and attributes already defined. Then you using your script to copy across a formal module with headings, tables and attributes to a new formal module with name defined in a dialog box.

This sounds like an equally, if not better way of doing the same thing.

Are you able to point me in the direction, or highlight the key steps that your script uses to achevie this?

Regards
Sasha